import request from '../utils/request';
import logRequest from '../utils/requestNoToken';
//登录
export const login = query => {
    return logRequest.post('/zsrencai/api/company/user/login', query);
};
// 退出登录
export const logout = () => {
    return request.get('/zsrencai/api/company/user/logout');
};
//职位类别字典
export const category = () => {
    return request.get('/zsrencai/api/sys/admin/jc/find/tree');
};
//职位性质字典
export const Nature = () => {
    return request.get('/zsrencai/api/sys/admin/dict/find/work_mode');
};
//工作区域字典
export const region = () => {
    return request.get('/zsrencai/api/sys/admin/dict/find/area');
};
// 工作区域zsrencai/api/sys/admin/pr/find/tree/430100,430200,430300 (新)
export const work_area = () => {
    return request.get('zsrencai/api/sys/admin/pr/find/tree/430100,430200,430300,333333');
};
//薪资待遇字典
export const wage = () => {
    return request.get('/zsrencai/api/sys/admin/dict/find/wage');
    //http://10.5.0.50:8100
};
//性别要求字典
export const sex = () => {
    return request.get('/zsrencai/api/sys/admin/dict/find/sex');
};
//学历字典
export const education = () => {
    return request.get('/zsrencai/api/sys/admin/dict/find/education');
};
//工作经验字典
export const work_exp = () => {
    return request.get('/zsrencai/api/sys/admin/dict/find/work_exp');
};
//年龄要求字典
export const hunter_age = () => {
    return request.get('/zsrencai/api/sys/admin/dict/find/hunter_age');
};
//工作亮点字典
export const allure = () => {
    return request.get('/zsrencai/api/sys/admin/dict/find/allure');
};
//校验图片
export const captchaImg = query => {
    return logRequest.get('/zsrencai/api/sys/admin/captcha/validate', { params: query });
};
//发送短信
export const postMsg = query => {
    return logRequest.post('/zsrencai/api/sys/admin/sms/code', query);
};
//注册
export const register = query => {
    return logRequest.post('/zsrencai/api/company/user/register', query);
};
//找回密码
export const findPassword = query => {
    return logRequest.post('/zsrencai/api/company/user/reset-pass-word', query);
};
// 发送邮箱验证码/zsrencai/api/sys/admin/mail/code
export const mailCode = query => {
    return logRequest.post('/zsrencai/api/sys/admin/mail/code', query);
};
// 上传图片
export const postPicture = query => {
    return request.post('/zsrencai/api/sys/admin/file/image/upload', query, { headers: { 'Content-Type': 'multipart/form-data' } });
};
// 社保认证
export const companySsAuth = query => {
    return request.post('/zsrencai/api/company/companySsAuth/add', query);
};
// 个人认证
export const companyStaffAuth = query => {
    return request.post('/zsrencai/api/company/companyStaffAuth/add', query);
};
// 企业认证信息查询
export const companyQuery = query => {
    return request.post('/zsrencai/api/company/company/selectByNameAndAuthStatus', query);
};
// 企业认证
export const companyAuth = query => {
    return request.post('/zsrencai/api/company/companyAuth/add', query);
};
// 刷新职位接口
export const refreshJob = query => {
    return request.post('/zsrencai/api/company/job/refresh', query);
};
//删除职位接口
export const deleteJob = query => {
    return request.post('/zsrencai/api/company/job/delete', query);
};
//下线职位接口
export const offlineJob = query => {
    return request.post('/zsrencai/api/company/job/offline', query);
};
//恢复职位接口
export const recoveryJob = query => {
    return request.post('/zsrencai/api/company/job/recovery', query);
};
//职位分页查询
export const list = query => {
    return request.post('/zsrencai/api/company/job/list/page', query);
};
//获取数量
export const statusCount = query => {
    return request.post('/zsrencai/api/company/job/get/job/status/count/by/current/company', query);
};
//发布职位接口
export const releaseJob = query => {
    return request.post('/zsrencai/api/company/job/release', query);
};
//修改职位接口
export const updateJob = query => {
    return request.post('/zsrencai/api/company/job/update', query);
};
// 保存企业信息
export const companyUpdate = query => {
    return request.post('/zsrencai/api/company/company/update', query);
};

// feat: 视频相关接口
export const uploadVideoChunk = query => {
    return logRequest.post('/zsrencai/api/sys/admin/file/video/upload', query, { headers: { 'Content-Type': 'multipart/form-data' } });
};

// feat: 删除视频 or 图片 相关接口
export const deletebyid = query => {
    return request.post('/zsrencai/api/company/company-file/deletebyid', query, { headers: { 'Content-Type': 'multipart/form-data' } });
};
// 职位模板分页查询
export const templatePage = query => {
    return request.post('/zsrencai/api/company/job/template/list/page', query);
};
// 职位模板删除
export const templateDelete = query => {
    return request.get(`/zsrencai/api/company/job/template/delete/${query}`);
};
// 新增职位模板
export const templateInsert = query => {
    return request.post('/zsrencai/api/company/job/template/insert', query);
};
// 修改职位模板
export const templateUpdate = query => {
    return request.post('/zsrencai/api/company/job/template/update', query);
};
// 根据当前登录用户查询职位模板
export const templateList = query => {
    return request.post('/zsrencai/api/company/job/template/list', query);
};
// 根据id 获取职位模板
export const templateById = query => {
    return request.get(`/zsrencai/api/company/job/template/get/${query}`);
};
//根据模板名称查询同企业模板名称不可重复
export const templateByName = query => {
    return request.post(`/zsrencai/api/company/job/template/find/template/name`, query);
};
// 查看是否存在未读消息
export const checkMsg = () => {
    return request.get('/zsrencai/api/company/msg/read');
};
// 校验企业信息完整度
export const validCompany = () => {
    return request.post('/zsrencai/api/company/company/query/valid/company');
};
// 查看是否存在未读聊天消息
export const checkChat = () => {
    return request.get('/zsrencai/ws/chat/getUnReadNum');
};

//获取二维码
export const getUserlogin = time => {
    return logRequest.get(`/zsrencai/api/company/user/wx/get/qrcode`);
};

//查看登录状态
export const wxLogin = time => {
    return logRequest.post(`/zsrencai/api/company/user/wx/login`, time);
};
